#!/bin/sh

# Depending on your RXTX setup you may need to specify LD_LIBRARY_PATH
# to be a lib dir containing rxtxSerial.so

./ws2300.sh station
./ws2300.sh device

# Note the proxy test requires "interceptty" to be on the user's PATH.
./ws2300.sh proxy i $HOME/ws2300 m /ws2307.txt &
PROXY_PID=$!

sleep 2

./ws2300.sh -Dgnu.io.rxtx.SerialPorts=$HOME/ws2300 device $HOME/ws2300 0000 r 0020
./ws2300.sh -Dgnu.io.rxtx.SerialPorts=$HOME/ws2300 device $HOME/ws2300 0017 w f13d
./ws2300.sh -Dgnu.io.rxtx.SerialPorts=$HOME/ws2300 device $HOME/ws2300 0018 s 3
./ws2300.sh -Dgnu.io.rxtx.SerialPorts=$HOME/ws2300 device $HOME/ws2300 0018 u 3
./ws2300.sh -Dgnu.io.rxtx.SerialPorts=$HOME/ws2300 station $HOME/ws2300 true
 
kill $PROXY_PID